package com.woniu.product.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName coupon_status
 */
@TableName(value ="coupon_status")
public class CouponStatus implements Serializable {
    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * 优惠卷表id
     */
    private String userCouponid;

    /**
     * 用户id
     */
    private String userid;

    /**
     * 商品id
     */
    private String productId;

    /**
     * 领取时间
     */
    private Date createtime;

    /**
     * 0:未使用，1：已使用，2：已过期
     */
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public String getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 优惠卷表id
     */
    public String getUserCouponid() {
        return userCouponid;
    }

    /**
     * 优惠卷表id
     */
    public void setUserCouponid(String userCouponid) {
        this.userCouponid = userCouponid;
    }

    /**
     * 用户id
     */
    public String getUserid() {
        return userid;
    }

    /**
     * 用户id
     */
    public void setUserid(String userid) {
        this.userid = userid;
    }

    /**
     * 商品id
     */
    public String getProductId() {
        return productId;
    }

    /**
     * 商品id
     */
    public void setProductId(String productId) {
        this.productId = productId;
    }

    /**
     * 领取时间
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 领取时间
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * 0:未使用，1：已使用，2：已过期
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 0:未使用，1：已使用，2：已过期
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CouponStatus other = (CouponStatus) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserCouponid() == null ? other.getUserCouponid() == null : this.getUserCouponid().equals(other.getUserCouponid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserCouponid() == null) ? 0 : getUserCouponid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userCouponid=").append(userCouponid);
        sb.append(", userid=").append(userid);
        sb.append(", productId=").append(productId);
        sb.append(", createtime=").append(createtime);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}